package logic;

import dataAccess.AgencyDB;
import exception.MyException;

public class Agency {
	
	private int idAgency;
	private String user;
	private String password;
	
	
	public Agency() {
		super();
	}

	public Agency(int idAgency, String user, String password) {
		super();
		this.idAgency = idAgency;
		this.user = user;
		this.password = password;
	}

	public int getIdAgency() {
		return idAgency;
	}

	public void setIdAgency(int idAgency) {
		this.idAgency = idAgency;
	}

	public String getUser() {
		return user;
	}

	public void setUser(String user) {
		this.user = user;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}
	
	public Agency getDataAgency() throws MyException{
		AgencyDB adb = new AgencyDB();
		Agency a = adb.getData();
		return a;
	}

}
